package cn.wolfcode.p2p.base.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
public class BaseAuditDomain extends BaseDomain {

    //状态
    public static final int STATE_NORMAL = 0; //待审核

    public static final int STATE_SUCCESS = 1; //审核通过

    public static final int STATE_REJECT = 2;  //审核拒绝

    //状态默认值为待审核
    protected Integer state = STATE_NORMAL;
    //备注
    protected String remark;
    //审核时间(审核人)
    protected Date auditTime;
    //申请时间(申请人)
    protected Date applyTime;
    //审核人
    protected LoginInfo auditor;
    //申请人
    protected LoginInfo applier;

    //显示状态
    public String getStateDisplay() {
        switch (state) {
            case STATE_NORMAL:
                return "待审核";
            case STATE_SUCCESS:
                return "审核通过";
            case STATE_REJECT:
                return "审核拒绝";
        }
        return "审核状态异常";
    }
}
